package com.yuandian.customer.perception.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.customer_perception.po.VisitReportParams;
import com.yuandian.api.customer_perception.vo.ReportInfo;
import com.yuandian.api.customer_perception.vo.UserVisitDetailVo;
import com.yuandian.api.customer_perception.vo.UserVisitOverrideVo;
import com.yuandian.api.customer_perception.vo.VisitOverrideVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liXin
 * @description 访问报表mapper
 * @date 2022/5/23
 */
@Repository
public interface VisitReportMapper {

    /**
     *  报表菜单页面访问总览
     * @param objectPage
     * @param params
     * @param tableInfos
     * @return
     */
	//@SqlAlias("访问报表-报表菜单页面访问总览")
    IPage<VisitOverrideVo> visitOverride(Page<Object> objectPage, @Param("params") VisitReportParams params, @Param("tableNameLIst") List<String> tableInfos);

    /**
     * 用户访问概览
     * @param objectPage
     * @param params
     * @param tableInfos
     * @return
     */
    //@DS("khgzData")
	//@SqlAlias("访问报表-用户访问概览")
    IPage<UserVisitOverrideVo> userVisitOverride(Page<Object> objectPage, @Param("params") VisitReportParams params, @Param("tableNameList") List<String> tableInfos);

    //@DS("khgzData")
	//@SqlAlias("访问报表-用户访问明细")
    IPage<UserVisitDetailVo> userVisitDetail(@Param("objectPage") Page<Object> objectPage, @Param("params") VisitReportParams params, @Param("tableNameList") List<String> tableNameList, @Param("detailKeys") List<String> detailKeys);

    //@DS("khgzData")
	//@SqlAlias("访问报表-用户访问明细")
    IPage<UserVisitDetailVo> userVisitDetailByDown(@Param("objectPage") Page<Object> objectPage, @Param("params") VisitReportParams params, @Param("tableNameList") List<String> tableNameList, @Param("detailKeys") String[] detailKeys);

    //@DS("systemData")
	//@SqlAlias("访问报表-菜单名称下拉框")
    IPage<ReportInfo> getReportInfo(Page<Object> objectPage, @Param("params") VisitReportParams params);

    //@DS("khgzData")
	//@SqlAlias("访问报表-用户访问明细")
    List<UserVisitOverrideVo> getDetailKeys(@Param("params") VisitReportParams params, @Param("tableNameList") List<String> tableNameList);
}
